﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using System.Configuration;
using Microsoft.Practices.Unity.Configuration;

namespace Skynet.ServiceLayer.External.Test
{
    public class UnityHelper
    {
        public static bool is_configure = false;
        public static void ConfigurateContainer()
        {
            if (!is_configure)
            {
                var ins = Infrastructure.Aspect.Patterns.Singleton<UnityContainer, IUnityContainer>.Instance;
                var AspectSection = ConfigurationManager.GetSection("unity") as UnityConfigurationSection;
                ins.LoadConfiguration(AspectSection);
                is_configure = true;
            }
        }

    }    
}
